package com.wt.admin.domain.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@TableName(value = "sys_menu")
public class SysMenuEntity {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value = "menu_name")
    private String menuName;

    /**
     * 迎合前端权限，一定要叫 path
     */
    @TableField(value = "path")
    private String path;

    /**
     * 迎合前端tree结构，一定要叫 parent
     */
    @TableField(value = "parent")
    private Integer parent;

    @TableField(value = "order_num")
    private Integer orderNum;

    @TableField(value = "enable_tag")
    private Boolean enableTag;

    @TableField(exist = false)
    private List<SysMenuEntity> children = new ArrayList<>();
}
